<template>
  <div>
    <Header></Header>
    <button @click="destroy">父组件卸载指令</button>
  </div>
</template>

<script>
import Header from "./components/Header/Header.vue";
export default {
  name: "App",
  //注册组件
  components: { Header },
  data() {
    return {
      count: 1,
    };
  },
  methods: {
    destroy() {
      this.$destroy();
    },
  },
  beforeCreate() {
    console.log("父组件beforeCreate");
  },
  created() {
    console.log("父组件created");
  },
  beforeMount() {
    console.log("父组件beforeMount");
  },
  mounted() {
    console.log("父组件mounted");
  },
  beforeUpdate() {
    console.log("父组件beforeUpdate");
  },
  updated() {
    console.log("父组件updated");
  },
  beforeDestroy() {
    console.log("父组件beforeDestroy");
  },
  destroyed() {
    console.log("父组件destroyed");
  },
};
</script>

<style></style>
